<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/5/20 0020
 * Time: 下午 4:53
 */
namespace app\model;
class UserResumeCertificate extends \think\Model{
    public $table="user_resume_certificate";

    function add_user_resume_cer($data){
        $data['created_at']=cur_time();
        return $this->insert($data,false,true);
    }

    function edit_user_resume_cer($data,$id){
        $data['updated_at']=cur_time();
        unset($data['id']);
        return $this->where(['id'=>$id])->update($data);
    }

    function del_user_resume_cer($id){
        return $this->where(['id'=>$id])->delete();
    }

    function get_arrs_by_user_id($user_id){
        $o=$this->where(['user_id'=>$user_id])->select();
        return object2array($o);
    }

    function get_user_resume_cert_by_id($id){
        $o=$this->where(['id'=>$id])->find();
        return object2array($o);
    }
}